package com.z.mapper;

import com.z.entity.AuRights;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zz
 * @since 2021-08-13
 */
@Mapper
public interface AuRightsMapper extends BaseMapper<AuRights> {

    @Select("select r.right_name authName  from  au_rights r " +
            "INNER JOIN au_inner_rights_users airu ON r.right_id = airu.right_id " +
            "INNER JOIN users  ON users.user_id = airu.user_id where users.user_id = #{adminId};")
    List<String> selectAuRightsNameByUserId(Integer adminId);
}
